package com.kejiguan.ui.dialog;

import android.content.Context;

import com.kejiguan.ui.R;

/**
 * Created by YYY on 2016/5/1.
 */
public class ModifyUserPassDialogUtil {

    private static ModifyUserPassDialogUtil instance;
    private ModifyUserPassDialog modifyUserPassDialog;

    public ModifyUserPassDialogUtil() {
    }

    public static ModifyUserPassDialogUtil getInstance() {
        if (instance == null) {
            synchronized (ModifyUserPassDialogUtil.class) {
                if (instance == null) {
                    instance = new ModifyUserPassDialogUtil();
                }
            }
        }
        return instance;
    }

    public void show(Context context,ModifyUserPassDialog.OnNewPassListener onNewPassListener)
    {
        if (null==modifyUserPassDialog||!modifyUserPassDialog.isShowing())
        {
            modifyUserPassDialog=new ModifyUserPassDialog(context, R.style.dialog_tran);
        }
        modifyUserPassDialog.withOnNewPassListener(onNewPassListener).show();
        modifyUserPassDialog.setCanceledOnTouchOutside(true);
    }

}
